home *** CD-ROM | disk | FTP | other *** search
/ Digitalfoto 118 / Digitalfoto 118.iso / mac / programas / 00 / start.swf / scripts / __Packages / com / robertpenner / easing / Quart.as < prev    next >
Text File  |  2009-11-16  |  707b  |  31 lines

  1. class com.robertpenner.easing.Quart
  2. {
  3.    function Quart()
  4.    {
  5.    }
  6.    static function easeIn(t, b, c, d)
  7.    {
  8.       return c * (t /= d) * t * t * t + b;
  9.    }
  10.    static function easeOut(t, b, c, d)
  11.    {
  12.       return (- c) * ((t = t / d - 1) * t * t * t - 1) + b;
  13.    }
  14.    static function easeInOut(t, b, c, d)
  15.    {
  16.       if((t /= d / 2) < 1)
  17.       {
  18.          return c / 2 * t * t * t * t + b;
  19.       }
  20.       return (- c) / 2 * ((t -= 2) * t * t * t - 2) + b;
  21.    }
  22.    static function easeOutIn(t, b, c, d)
  23.    {
  24.       if((t /= d / 2) < 1)
  25.       {
  26.          return (- c) / 2 * ((t = t - 1) * t * t * t - 1) + b;
  27.       }
  28.       return c / 2 * ((t = t - 1) * t * t * t + 1) + b;
  29.    }
  30. }
  31.